<?php
header('Content-Type: text/html; charset=UTF-8');

require 'database.php';
$db = new DB();

$Qry = 'SELECT g_id, g_name, crawl_url, width, height, description
		FROM games
		WHERE object = "http://gamecdn.gamepilot.com/data/"
		ORDER BY g_id DESC';

if ($db->numRows($Qry) > 0) {
	$res = $db->fetchAll($Qry);

	foreach ($res as $key=>$value) {
		echo 'Source: <a href="' . $value['crawl_url'] . '" target="_blank">' . $value['g_name'] . ' (' . $value['width'] . 'x' . $value['width'] . ')' . '</a> [<a href="/_crawl/fixgame.php?id=' . $value['g_id'] . '&url=' . urlencode($value['crawl_url']) . '" target="_blank">Edit</a>]<br />';
// 		echo '<p>' . $value['description'] . '</p>';
	}
}